FIG. 2 is a view depicting a configuration example of a microcontroller 201 including a voltage detection circuit 203, and FIG. 3 is a timing chart depicting an operation example of the microcontroller 201 in FIG. 2. When a power switch SW is turned on at a time t1, a power supply voltage V1 rises from a ground potential to a voltage V. The microcontroller 201 includes a CPU (central processing unit) 202, the voltage detection circuit 203, a resistance R and capacitance C, and inputs the power supply voltage V1. A power supply voltage V2 becomes a voltage obtained by delaying the power supply voltage V1 by a time constant circuit (delay circuit) configured by the resistance R and the capacitance C. The voltage detection circuit 203 outputs a power-on detect flag PR depending on the power supply voltage V2. The power-on detect flag PR becomes a low level when the power supply voltage V2 is less than a threshold value, and the power-on detect flag PR becomes a high level when the power supply voltage V2 is equal to or more than the threshold value. At a time t2, the power-on detect flag PR becomes the high level and power-on by the power switch SW is detected. The CPU 202 performs a process depending on the power-on detect flag PR.
However, in order to detect power-on, an analog circuit such as the time constant circuit (including the resistance R and the capacitance C) and the voltage detection circuit 203, and so on are needed. A circuit parameter of the analog circuit depends on a semiconductor process significantly. Therefore, according to development of semiconductor microfabrication technique, it is necessary to develop a circuit newly every process rule, and influence on a development period and a development cost is significant. Further, the analog circuit is generally large compared with a digital circuit (logic circuit), and it is impossible to ignore influence on a circuit size as well.
Japanese Laid-open Patent Publication No. 08-80810 discloses a power cut-off detecting device in an apparatus equipped with a security mechanism, which is a device to detect an occurrence of a power cut-off state in the apparatus equipped with the security mechanism and includes: a power cut-off storing unit in which a storage content is damaged when a power supply to the apparatus is cut off; and a microcomputer judging that power cut-off is performed and performing a prescribed security process in the case when the storage content in the power cut-off storing unit is damaged at the time when reset starts.